#include "Comm.hpp"

int main()
{
    int write_fd = open(Path,O_WRONLY);
    if(write_fd < 0)
    {
        cerr << "open fail:->errno->" << errno<< "->"<<strerror(errno) << endl;
        return 1;
    }

    string in;
    while(1)
    {
        cout << "Please cin Your Message" << endl;
        getline(cin,in);
        if(in == "quit")break;
        ssize_t n = write(write_fd,in.c_str(),in.size());
        if(n < 0)
        {
             cerr << "write fail:->errno->" << errno<< "->"<<strerror(errno) << endl;
             break;
        }
    }
    close(write_fd);
    return 0;
}